import Qt 4.7

Item {
    property string text: ""
    property int fontSize: 44

    signal clicked
    MouseArea { id: ma; anchors.fill: parent; onClicked: parent.clicked() }

    BorderImage {
        anchors.fill: parent
        source: "button_generic.sci"
        visible: !ma.pressed
    }

    BorderImage {
        anchors.fill: parent
        source: "button_generic_hover.sci"
        visible: ma.pressed
    }

    Text {
        anchors.centerIn:parent
        text: parent.text
        font.pixelSize: fontSize
        color: "#8baed8";
        scale: if (!ma.pressed) { 1 } else { 0.95 }
        smooth: true
    }
}